3.54 \(\int \text {sech}^2(c+d x) (a+b \text {sech}^2(c+d x)) \, dx\)

Optimal. Leaf size=30 \[ \frac {(a+b) \tanh (c+d x)}{d}-\frac {b \tanh ^3(c+d x)}{3 d} \]

[Out]

(a+b)*tanh(d*x+c)/d-1/3*b*tanh(d*x+c)^3/d

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 43, normalized size of antiderivative = 1.43, number of steps used = 3, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {4046, 3767, 8} \[ \frac {(3 a+2 b) \tanh (c+d x)}{3 d}+\frac {b \tanh (c+d x) \text {sech}^2(c+d x)}{3 d} \]

Antiderivative was successfully verified.

[In]

Int[Sech[c + d*x]^2*(a + b*Sech[c + d*x]^2),x]

[Out]

((3*a + 2*b)*Tanh[c + d*x])/(3*d) + (b*Sech[c + d*x]^2*Tanh[c + d*x])/(3*d)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 4046

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*(csc[(e_.) + (f_.)*(x_)]^2*(C_.) + (A_)), x_Symbol] :> -Simp[(C*Cot[
e + f*x]*(b*Csc[e + f*x])^m)/(f*(m + 1)), x] + Dist[(C*m + A*(m + 1))/(m + 1), Int[(b*Csc[e + f*x])^m, x], x]
/; FreeQ[{b, e, f, A, C, m}, x] && NeQ[C*m + A*(m + 1), 0] &&  !LeQ[m, -1]

Rubi steps

\begin {align*} \int \text {sech}^2(c+d x) \left (a+b \text {sech}^2(c+d x)\right ) \, dx &=\frac {b \text {sech}^2(c+d x) \tanh (c+d x)}{3 d}+\frac {1}{3} (3 a+2 b) \int \text {sech}^2(c+d x) \, dx\\ &=\frac {b \text {sech}^2(c+d x) \tanh (c+d x)}{3 d}+\frac {(i (3 a+2 b)) \operatorname {Subst}(\int 1 \, dx,x,-i \tanh (c+d x))}{3 d}\\ &=\frac {(3 a+2 b) \tanh (c+d x)}{3 d}+\frac {b \text {sech}^2(c+d x) \tanh (c+d x)}{3 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 39, normalized size = 1.30 \[ \frac {a \tanh (c+d x)}{d}-\frac {b \tanh ^3(c+d x)}{3 d}+\frac {b \tanh (c+d x)}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[Sech[c + d*x]^2*(a + b*Sech[c + d*x]^2),x]

[Out]

(a*Tanh[c + d*x])/d + (b*Tanh[c + d*x])/d - (b*Tanh[c + d*x]^3)/(3*d)

________________________________________________________________________________________

fricas [B]  time = 0.38, size = 158, normalized size = 5.27 \[ -\frac {4 \, {\left ({\left (3 \, a + b\right )} \cosh \left (d x + c\right )^{2} - 2 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + {\left (3 \, a + b\right )} \sinh \left (d x + c\right )^{2} + 3 \, a + 3 \, b\right )}}{3 \, {\left (d \cosh \left (d x + c\right )^{4} + 4 \, d \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + d \sinh \left (d x + c\right )^{4} + 4 \, d \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, d \cosh \left (d x + c\right )^{2} + 2 \, d\right )} \sinh \left (d x + c\right )^{2} + 4 \, {\left (d \cosh \left (d x + c\right )^{3} + d \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + 3 \, d\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(d*x+c)^2*(a+b*sech(d*x+c)^2),x, algorithm="fricas")

[Out]

-4/3*((3*a + b)*cosh(d*x + c)^2 - 2*b*cosh(d*x + c)*sinh(d*x + c) + (3*a + b)*sinh(d*x + c)^2 + 3*a + 3*b)/(d*
cosh(d*x + c)^4 + 4*d*cosh(d*x + c)*sinh(d*x + c)^3 + d*sinh(d*x + c)^4 + 4*d*cosh(d*x + c)^2 + 2*(3*d*cosh(d*
x + c)^2 + 2*d)*sinh(d*x + c)^2 + 4*(d*cosh(d*x + c)^3 + d*cosh(d*x + c))*sinh(d*x + c) + 3*d)

________________________________________________________________________________________

giac [B]  time = 0.12, size = 61, normalized size = 2.03 \[ -\frac {2 \, {\left (3 \, a e^{\left (4 \, d x + 4 \, c\right )} + 6 \, a e^{\left (2 \, d x + 2 \, c\right )} + 6 \, b e^{\left (2 \, d x + 2 \, c\right )} + 3 \, a + 2 \, b\right )}}{3 \, d {\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(d*x+c)^2*(a+b*sech(d*x+c)^2),x, algorithm="giac")

[Out]

-2/3*(3*a*e^(4*d*x + 4*c) + 6*a*e^(2*d*x + 2*c) + 6*b*e^(2*d*x + 2*c) + 3*a + 2*b)/(d*(e^(2*d*x + 2*c) + 1)^3)

________________________________________________________________________________________

maple [A]  time = 0.34, size = 34, normalized size = 1.13 \[ \frac {a \tanh \left (d x +c \right )+b \left (\frac {2}{3}+\frac {\mathrm {sech}\left (d x +c \right )^{2}}{3}\right ) \tanh \left (d x +c \right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sech(d*x+c)^2*(a+b*sech(d*x+c)^2),x)

[Out]

1/d*(a*tanh(d*x+c)+b*(2/3+1/3*sech(d*x+c)^2)*tanh(d*x+c))

________________________________________________________________________________________

maxima [B]  time = 0.32, size = 112, normalized size = 3.73 \[ \frac {4}{3} \, b {\left (\frac {3 \, e^{\left (-2 \, d x - 2 \, c\right )}}{d {\left (3 \, e^{\left (-2 \, d x - 2 \, c\right )} + 3 \, e^{\left (-4 \, d x - 4 \, c\right )} + e^{\left (-6 \, d x - 6 \, c\right )} + 1\right )}} + \frac {1}{d {\left (3 \, e^{\left (-2 \, d x - 2 \, c\right )} + 3 \, e^{\left (-4 \, d x - 4 \, c\right )} + e^{\left (-6 \, d x - 6 \, c\right )} + 1\right )}}\right )} + \frac {2 \, a}{d {\left (e^{\left (-2 \, d x - 2 \, c\right )} + 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(d*x+c)^2*(a+b*sech(d*x+c)^2),x, algorithm="maxima")

[Out]

4/3*b*(3*e^(-2*d*x - 2*c)/(d*(3*e^(-2*d*x - 2*c) + 3*e^(-4*d*x - 4*c) + e^(-6*d*x - 6*c) + 1)) + 1/(d*(3*e^(-2
*d*x - 2*c) + 3*e^(-4*d*x - 4*c) + e^(-6*d*x - 6*c) + 1))) + 2*a/(d*(e^(-2*d*x - 2*c) + 1))

________________________________________________________________________________________

mupad [B]  time = 1.38, size = 61, normalized size = 2.03 \[ -\frac {2\,\left (3\,a+2\,b+6\,a\,{\mathrm {e}}^{2\,c+2\,d\,x}+3\,a\,{\mathrm {e}}^{4\,c+4\,d\,x}+6\,b\,{\mathrm {e}}^{2\,c+2\,d\,x}\right )}{3\,d\,{\left ({\mathrm {e}}^{2\,c+2\,d\,x}+1\right )}^3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b/cosh(c + d*x)^2)/cosh(c + d*x)^2,x)

[Out]

-(2*(3*a + 2*b + 6*a*exp(2*c + 2*d*x) + 3*a*exp(4*c + 4*d*x) + 6*b*exp(2*c + 2*d*x)))/(3*d*(exp(2*c + 2*d*x) +
 1)^3)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \operatorname {sech}^{2}{\left (c + d x \right )}\right ) \operatorname {sech}^{2}{\left (c + d x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(d*x+c)**2*(a+b*sech(d*x+c)**2),x)

[Out]

Integral((a + b*sech(c + d*x)**2)*sech(c + d*x)**2, x)

________________________________________________________________________________________